home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / VISUALBA / BOZOL2.ZIP / BOZOL.REF < prev    next >
Text File  |  1994-02-08  |  14KB  |  388 lines

  1.  
  2. >>>     ASC      - function to return the ascii code of an argument
  3.  
  4.         Example: PRINT "The ASCII code of A is" ASC "A"
  5.  
  6. >>>     ASCII    - function to return the ascii code of an argument
  7.  
  8.         Same as ASC
  9.  
  10. >>>     BE       - Placeholder for syntax.  This command does nothing
  11.  
  12.         Placeholders are dummy commands that help make the syntax more
  13.         natural.  You can use this, as well as other placeholders anywhere
  14.         in a statement and it will simply be ignored.
  15.  
  16.         Example: LET X BE 1
  17.  
  18. >>>     CALC     - Calculates whatever expression follows.
  19.  
  20.         This command performs the same function as EVAL, CASE, and WHAT.
  21.         BozoL will not automatically calculate arithmetic expressions in
  22.         a statement.  If you said
  23.  
  24.                 PRINT 1+1
  25.  
  26.         BozoL will literally print "1+1".  In order to evaluate an expression
  27.         you must use CALC, EVAL, CASE or WHAT before the expression.  These
  28.         keywords can be intermixed and used multiple times in a statement.
  29.         There is no difference between the four of them.  Having a choice
  30.         just makes the syntax easier to read and remember.
  31.  
  32.  
  33.         Example: PRINT CALC 1+1                    (would print 2)
  34.  
  35.         Example: IF EVAL A>B: GOSUB 10             (would jump to 10 if
  36.                  IF CASE A=B: GOSUB 10             the expression is true)
  37.  
  38.         Example: PRINT WHAT A+B IS                 (would print A+B.  The
  39.                                                    keyword IS is also a
  40.                                                    placeholder and does
  41.                                                    nothing)
  42.  
  43. >>>     CASE     - Calculates whatever expression follows.
  44.  
  45.         Same as CALC
  46.  
  47. >>>     CHR      - Returns the character string of an ASCII code
  48.  
  49.         Example: PRINT CHR 7
  50.  
  51. >>>     CLS      - Clears the screen
  52.  
  53.         Example: IF finished:CLS:END
  54.  
  55. >>>     COLOR    - Sets the current color selection
  56.  
  57.         Just like BASIC.
  58.  
  59. >>>     CR       - Returns a carriage return
  60.  
  61.         Example: PRINT "Hello" CR CR CR "Goodbye!"
  62.  
  63. >>>     END      - Exits the BozoL interpreter.
  64.  
  65.         End exits the subroutine PROGRUN and terminates the program.
  66.  
  67. >>>     EQUAL    - Placeholder for syntax.  This command does nothing
  68.  
  69.         LET and SET are used to assign values to variables.  They only
  70.         need two arguments, the variable, and the value for it.  Since
  71.         LET A B would be unclear, you can use a placeholder, such as
  72.         EQUAL to make the syntax a little more readable:
  73.  
  74.         Example: LET A EQUAL B
  75.  
  76. >>>     EQUALS   - Tests two string values, returns true if they are the same
  77.  
  78.         This function does not make for a readable syntax.  It is identical
  79.         to the function SAME
  80.  
  81.         Example: QUIT IF EQUALS UCASE INKEY "X"  (quit if X is in keyboard)
  82.  
  83.         Example: BE UNTIL NOT EQUALS INKEY ""    (wait for a key to be pressed)
  84.  
  85. >>>     EVAL     - Calculates whatever expression follows.
  86.  
  87.         Same as CALC
  88.  
  89. >>>     FALSE    - Returns a logical false (0)
  90.  
  91.         Example: PRINT "Wheeeeeee" WHILE WHAT LEN INKEY = IS FALSE
  92.  
  93. >>>     GOSUB    - Jumps to a subroutine which terminates with RETURN
  94.  
  95.         This works the same as BASIC's GOSUB statement.  You can nest up
  96.         to 32 GOSUBs.  GOSUB must be followed by a line number or a label.
  97.  
  98.         Example: PRINT "Starting here"
  99.                  GOSUB Middle
  100.                  PRINT "Ending here!"
  101.                  END
  102.                  Middle:
  103.                  PRINT "This is the middle!" : RETURN
  104.  
  105. >>>     GOTO     - Jumps to a line number or label.
  106.  
  107.         This works just like the BASIC GOTO statement.  You must be aware
  108.         that BozoL does not inherantly label line numbers, so unless you
  109.         are sure that the line number is not going to change (by adding
  110.         or deleting a line above it) you should use labels.
  111.  
  112.         Example: PRINT "Starting here."
  113.                  GOTO TheEnd
  114.                  PRINT "Never gets here!"
  115.                  TheEnd:
  116.                  PRINT "This is the end!"
  117.  
  118. >>>     IF       - Test and expression and continue if true
  119.  
  120.         This is similar to the BASIC IF statement, however it has some
  121.         strict limitations and differences.  First, there is no THEN
  122.         statement.  Simply follow IF with an expression and then a colon.
  123.         If the expression is true, the remainder of the line will be
  124.         executed.  There is also no ELSE keyword.
  125.  
  126.         Example: IF EVAL A=B: GOSUB 100
  127.  
  128.         A second use for IF is to place the IF expression at the very
  129.         end of the line.  If the expression is false, the preceeding
  130.         statements not separated by colons will be aborted.
  131.  
  132.         Example: GOSUB 100 IF EVAL A=B
  133.  
  134. >>>     IN       - Placeholder for syntax.  This command does nothing
  135.  
  136.         Example: SAVE IN "TEST.PRG"
  137.  
  138. >>>     INKEY    - Returns next character in keyboard buffer, if any
  139.  
  140.         INKEY does not pause.  If one or more characters are waiting in
  141.         the keyboard buffer INKEY will return that character.  If no
  142.         characters are waiting INKEY will return a null.
  143.  
  144.         Example: BE UNTIL LEN INKEY
  145.  
  146.         Remember that BE is just a placehoder.  The expression
  147.         UNTIL LEN INKEY would work just the same.
  148.  
  149. >>>     INPUT    - Gets a line of input from the user into a variable
  150.  
  151.         You can follow INPUT by a valid sequence of items to print.
  152.         The final parameter of INPUT must be a variable to contain the
  153.         input line after it has been typed.  Unlike BASIC, the INPUT
  154.         expression may contain variables and functions.
  155.  
  156.         Example: INPUT "What is your name? ",NAME
  157.  
  158.         This would prompt the user (What is your name?) and then wait
  159.         while the user responds.  When the user presses ENTER, the
  160.         response would be contained in the variable NAME.  You can
  161.         use placeholders or a space to delimit this line.
  162.  
  163.         Example: INPUT "What is your name? " TO NAME
  164.  
  165. >>>     IS       - Placeholder for syntax.  This command does nothing
  166.  
  167.         Example: GOTO 100 IF IS SAME A,B
  168.  
  169. >>>     LCASE    - Returns the lower case of an argument
  170.  
  171.         Example: IF SAME LCASE INKEY,"y": END
  172.  
  173.  
  174.  
  175. >>>     LEFT     - Returns specified number of characters from left of string
  176.  
  177.         Example: PRINT LEFT "Erik",3
  178.  
  179.         This would print "Eri" on the screen.  Not that a comma is also
  180.         just a placeholder and can be substituted with a space or a
  181.         semicolon.
  182.  
  183. >>>     LEN      - Returns the length of a string expression
  184.  
  185.         Example: BE UNTIL LEN INKEY
  186.  
  187.         This statement would loop until the length of INKEY was no longer
  188.         zero.
  189.  
  190. >>>     LET      - Assigns a value to a variable (same as SET)
  191.  
  192.         Example: LET A EQUAL B
  193.  
  194.         Note that you cannot use the equals sign (=) to assign a value
  195.         to a variable.  The equals sign is only used in arithmetic
  196.         expressions to test whether one number is equal to another.
  197.  
  198.         example: LET A BE EQUAL TO B
  199.  
  200.         LET only requires two parameters, a varable and a value.  You
  201.         can use placeholders, a comma, or just a space to separate them.
  202.         The above example is identical to LET A,B
  203.  
  204. >>>     LIST     - lists the program currently in memory to the screen
  205.  
  206.         LIST by itself will type the whole program to the screen.  LIST
  207.         followed by a line number will display that line.  List followed
  208.         by two line numbers will display all of the numbers in between.
  209.  
  210.         Example: LIST 1 TO 100
  211.  
  212.         Note the placeholder TO.  You could also just say LIST 1 100 or
  213.         LIST 1,100 and it would work the same.
  214.  
  215. >>>     LOAD     - Reads a program file from disk into memory.
  216.  
  217.         Example: LOAD "TEST.PRG"
  218.  
  219. >>>     LOCATE   - Positions the cursor on the screen.
  220.  
  221.         Example: LOCATE 10,10 : PRINT "Hi there!"
  222.  
  223. >>>     LOWER    - Returns the lower case of a string expression
  224.  
  225.         Same as LCASE
  226.  
  227. >>>     LTRIM    - Trims leading spaces from a string